package com.example.task;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class MsgTask implements Runnable {

    private String msg;

    public MsgTask(String msg) {
        this.msg = msg;
    }

    @Override
    public void run() {
        try {
            log.info("info log");
            log.warn("warn log");
            log.error("error log");
            throw new RuntimeException("发生异常了");
        } catch (Exception e) {
            log.error("exception", e);
        }
    }

}
